﻿<!DOCTYPE html>
<HTML>
<HEAD>
	<TITLE> ZTREE DEMO - checkbox</TITLE>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" href="zTree/css/demo.css" type="text/css">
	<link rel="stylesheet" href="zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
	<script type="text/javascript" src="zTree/js/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="zTree/js/jquery.ztree.core.js"></script>
	<script type="text/javascript" src="zTree/js/jquery.ztree.excheck.js"></script>
	<!--
	<script type="text/javascript" src="../../../js/jquery.ztree.exedit.js"></script>
	-->
	<SCRIPT type="text/javascript">
		<!--
		var setting = {
			check: {
				enable: true
			},
			data: {
				simpleData: {
					enable: true
				}
			}
		};

		var zNodes = [
            { id: 0, pId: 0, name: "广州东山新天地(项目)", open: false },
			{ id:1, pId:0, name:"分户(验收类型)", open:false},
			{ id: 11, pId: 1, name: "主卧(部位)", open: false },
			{ id: 111, pId: 11, name: "门(检查项)" },
			{ id: 112, pId: 11, name: "插座(检查项)" },
			{ id: 12, pId: 1, name: "次卧(部位)", open: false },
			{ id: 121, pId: 12, name: "门(检查项)" },
			{ id: 122, pId: 12, name: "插座(检查项)" },

			{ id: 2, pId: 0, name: "楼层公区(验收类型)", checked: false, open: false },
			{ id: 21, pId: 2, name: "走廊地面(部位)" },
			{ id: 22, pId: 2, name: "管井(部位)", open: false },
			{ id: 221, pId: 22, name: "饮水管(检查项)", checked: false },
			{ id: 222, pId: 22, name: "阀门(检查项)" },
			{ id: 23, pId: 2, name: "走廊灯(部位)" },

            { id: 3, pId: 0, name: "设备设置(验收类型)" },
            { id: 31, pId: 3, name: "消防(部位)" },
			{ id: 32, pId: 3, name: "排水(部位)", open: false },
			{ id: 321, pId: 32, name: "排水管(检查项)", checked: false },
			{ id: 322, pId: 32, name: "阀门(检查项)" },
			{ id: 33, pId: 3, name: "空调(部位)" },
            { id: 34, pId: 3, name: "电梯(部位)" },
            { id: 341, pId: 34, name: "轿厢(一级检查项)" },
            { id: 3411, pId: 341, name: "轿门(二级检查项)" },
            { id: 34111, pId: 3411, name: "轿门不平整(问题描述)" },
            { id: 34112, pId: 3411, name: "其他(问题描述)" },
            { id: 342, pId: 34, name: "钢丝绳(检查项)" },
            { id: 342, pId: 34, name: "锁闭装置(检查项)" },
            { id: 342, pId: 34, name: "机械制动器(检查项)" },
            { id: 342, pId: 34, name: "限速器(检查项)" },
            { id: 342, pId: 34, name: "缓冲器(检查项)" },
            { id: 342, pId: 34, name: "安全钳(检查项)" },
            { id: 35, pId: 3, name: "变送电(部位)" },
            { id: 36, pId: 3, name: "中水(部位)" },
            { id: 37, pId: 3, name: "供热(部位)" },
            { id: 38, pId: 3, name: "给水(部位)" },
            { id: 39, pId: 3, name: "弱电(部位)" }            
		];

		var zNodes1 = [
            { id: 0, pId: 0, name: "北京富力新城(项目)", open: false },
			{ id: 1, pId: 0, name: "分户(验收类型)", open: false },
			{ id: 11, pId: 1, name: "主卧(部位)", open: false },
			{ id: 111, pId: 11, name: "门(检查项)" },
			{ id: 112, pId: 11, name: "插座(检查项)" },
			{ id: 12, pId: 1, name: "次卧(部位)", open: false },
			{ id: 121, pId: 12, name: "门(检查项)" },
			{ id: 122, pId: 12, name: "插座(检查项)" },

			{ id: 2, pId: 0, name: "楼层公区(验收类型)", checked: false, open: false },
			{ id: 21, pId: 2, name: "走廊地面(部位)" },
			{ id: 22, pId: 2, name: "管井(部位)", open: false },
			{ id: 221, pId: 22, name: "饮水管(检查项)", checked: false },
			{ id: 222, pId: 22, name: "阀门(检查项)" },
			{ id: 23, pId: 2, name: "走廊灯(部位)" },

            { id: 3, pId: 0, name: "设备设置(验收类型)" },
            { id: 31, pId: 3, name: "消防(部位)" },
			{ id: 32, pId: 3, name: "排水(部位)", open: false },
			{ id: 321, pId: 32, name: "排水管(检查项)", checked: false },
			{ id: 322, pId: 32, name: "阀门(检查项)" },
			{ id: 33, pId: 3, name: "空调(部位)" },
            { id: 34, pId: 3, name: "电梯(部位)" },
            { id: 341, pId: 34, name: "轿厢(一级检查项)" },
            { id: 3411, pId: 341, name: "轿门(二级检查项)" },
            { id: 34111, pId: 3411, name: "轿门不平整(问题描述)" },
            { id: 34112, pId: 3411, name: "其他(问题描述)" },
            { id: 342, pId: 34, name: "钢丝绳(检查项)" },
            { id: 342, pId: 34, name: "锁闭装置(检查项)" },
            { id: 342, pId: 34, name: "机械制动器(检查项)" },
            { id: 342, pId: 34, name: "限速器(检查项)" },
            { id: 342, pId: 34, name: "缓冲器(检查项)" },
            { id: 342, pId: 34, name: "安全钳(检查项)" },
            { id: 35, pId: 3, name: "变送电(部位)" },
            { id: 36, pId: 3, name: "中水(部位)" },
            { id: 37, pId: 3, name: "供热(部位)" },
            { id: 38, pId: 3, name: "给水(部位)" },
            { id: 39, pId: 3, name: "弱电(部位)" },
		];
		
		var code;

		$(document).ready(function(){
		    $.fn.zTree.init($("#treeDemo"), setting, zNodes);
		    $.fn.zTree.init($("#treeDemo1"), setting, zNodes1);
			
		});
		//-->
	</SCRIPT>
</HEAD>

<BODY>
<h1>Checkbox 勾选操作</h1>
<h6>[ 文件路径: excheck/checkbox.html ]</h6>
<div>
    <ul id="treeDemo" class="ztree" style="width:400px;"></ul>
    <ul id="treeDemo1" class="ztree" style="width:400px;"></ul>
</div>
</BODY>
</HTML>